<!DOCTYPE html>
<html>
<meta charset="utf-8">
<head th:include="include :: header"></head>
<body class="gray-bg">
<div class="wrapper wrapper-content ">
    <div class="row">
        <div class="col-sm-12">
            <div class="ibox float-e-margins">
                <div class="ibox-content">
                    <form class="form-horizontal m-t" id="signupForm">
                        <div class="form-group">
                            <label class="col-sm-3 control-label"></label>
                            <div class="col-sm-8">
                                <font color="red" size="3"> 非QQ邮箱登录时，密码栏位是必填项，QQ邮箱登录时独立密码是必填项</font>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label">姓名:</label>
                            <div class="col-sm-8">
                                <input id="name" name="name" class="form-control" type="text" value="钟兴恩">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label">手机号码:</label>
                            <div class="col-sm-8">
                                <input id="cell_phone_num" name="cell_phone_num" class="form-control" type="text"
                                       value="13890457392">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label">身份证号码:</label>
                            <div class="col-sm-8">
                                <input id="id_card_num" name="id_card_num" class="form-control" type="text"
                                       value="350822198011016884">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label">邮箱账号:</label>
                            <div class="col-sm-8">
                                <input id="email" name="email" class="form-control" type="text"
                                       value="892512592@qq.com">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label">邮箱密码:</label>
                            <div class="col-sm-8">
                                <input id="password" name="password" class="form-control" type="text" value="">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label">独立密码:</label>
                            <div class="col-sm-8">
                                <input id="identity" name="identity" class="form-control" type="text" value="password">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label" id="ecode">二维码:</label>
                            <div class="col-sm-8">
                                <img id="QrCode" src=""/>
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="col-sm-8 col-sm-offset-3">
                                <button type="button" class="btn btn-primary" onclick="formSubmit();">开始采集</button>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>
<div th:include="include::footer"></div>
<script type="text/javascript">
    $().ready(function () {
        $("#ecode").hide();
    });


    function formSubmit() {
        $.ajax({
            cache: true,
            type: "GET",
            url: "/system/loanUser/getCreditCardData",
            data: $('#signupForm').serialize(),
            async: false,
            error: function (request) {
                parent.layer.alert("Connection error");
            },
            success: function (data) {
                if (data.content != null || data.content != "") {
                    $("#ecode").show();
                    document.getElementById("QrCode").src = data.content;
                } else {
                    alert(data.msg);
                    alert(data.resultData);
                }
                /*
                 $.ajax({
                     cache : true,
                     type : "GET",
                     url : "/system/loanUser/getAlipayData",
                     data : {'token':data.token},
                     async : false,
                     error : function(request) {
                         parent.layer.alert("Connection error");
                     },
                     success : function(data) {
                     }
                 });
                 */
            }
        });
    }

</script>
</body>
</html>
